'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc.
.\" All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH INETCONV 8 "Oct 21, 2004"
.SH NAME
inetconv \- convert \fBinetd.conf\fR entries into smf service manifests, import
them into smf repository
.SH SYNOPSIS
.LP
.nf
\fBinetconv\fR \fB-?\fR
.fi

.LP
.nf
\fBinetconv\fR [\fB-f\fR] [\fB-n\fR] [\fB-i\fR \fIsrcfile\fR] [\fB-o\fR \fIdestdir\fR]
.fi

.LP
.nf
\fBinetconv\fR \fB-e\fR [\fB-n\fR] [\fB-i\fR \fIsrcfile\fR]
.fi

.SH DESCRIPTION
.sp
.LP
The \fBinetconv\fR utility converts a file containing records of
\fBinetd.conf\fR(5) into \fBsmf\fR(7) service manifests, and then import those
manifests into the \fBsmf\fR repository. Once the \fBinetd.conf\fR file has
been converted, the only way to change aspects of an inet service is to use the
\fBinetadm\fR(8) utility.
.sp
.LP
There is a one-to-one correspondence between a service line in the input file
and the manifest generated. By default, the manifests are named using the
following template:
.sp
.in +2
.nf
\fI<svcname>\fR-\fI<proto>\fR\fB\&.xml\fR
.fi
.in -2

.sp
.LP
The \fI<svcname>\fR token is replaced by the service's name and the
\fI<proto>\fR token by the service's protocol. Any slash (\fB/\fR) characters
that exist in the source line for the service name or protocol are replaced
with underscores (\fB_\fR).
.sp
.LP
The service line is recorded as a property of the converted service.
.sp
.LP
During the conversion process, if a service line is found to be malformed or to
be for an internal \fBinetd\fR service, no manifest is generated and that
service line is skipped.
.sp
.LP
The input file is left untouched by the conversion process.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-?\fR\fR
.ad
.RS 14n
Display a usage message.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.RS 14n
Enable \fBsmf\fR services which are listed in the input file.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.RS 14n
If a service manifest of the same name as the one to be generated is found in
the destination directory, \fBinetconv\fR will overwrite that manifest if this
option is specified. Otherwise, an error message is generated and the
conversion of that service is not performed.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR \fIsrcfile\fR\fR
.ad
.RS 14n
Permits the specification of an alternate input file \fIsrcfile\fR. If this
option is not specified, then the \fBinetd.conf\fR(5) file is used as input.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.RS 14n
Turns off the auto-import of the manifests generated during the conversion
process. Later, if you want to import a generated manifest into the
\fBsmf\fR(7) repository, you can do so through the use of the \fBsvccfg\fR(8)
utility.
.sp
If the \fB-e\fR option is specified, the \fB-n\fR option only displays the
\fBsmf\fR services that would be enabled.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 14n
Permits the specification of an alternate destination directory \fIdestdir\fR
for the generated manifests. If this option is not specified, then the
manifests are placed in \fB/var/svc/manifest/network/rpc\fR, if the service is
a RPC service, or \fB/var/svc/manifest/network\fR otherwise.
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRGenerating \fBsmf\fR Manifests from \fBinetd.conf\fR
.sp
.LP
The following command generates \fBsmf\fR(7) manifests from \fBinetd.conf\fR(5)
and places them in \fB/var/tmp\fR, overwriting any preexisting manifests of the
same name, and then imports them into the \fBsmf\fR repository.

.sp
.in +2
.nf
# inetconv -f -o /var/tmp
100232/10 -> /var/tmp/100232_10-rpc_udp.xml
Importing 100232_10-rpc_udp.xml ...Done
telnet -> /var/tmp/telnet-tcp6.xml
Importing telnet-tcp6.xml ...Done
.fi
.in -2

.LP
\fBExample 2 \fRGenerating Manifests from an Alternate Input File
.sp
.LP
The following command specifies a different input file and does not load the
resulting manifests into the \fBsmf\fR repository.

.sp
.in +2
.nf
# inetconv -n -i /export/test/inet.svcs -o /var/tmp
100232/10 -> /var/tmp/100232_10-rpc_udp.xml
telnet -> /var/tmp/telnet-tcp6.xml
.fi
.in -2

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Operation completed successfully (no errors).
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Invalid options specified.
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
One or more service lines are malformed, and thus no manifest(s) were generated
for them.
.RE

.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.RS 5n
An error occurred importing one or more of the generated manifests.
.RE

.sp
.ne 2
.na
\fB\fB4\fR\fR
.ad
.RS 5n
A system error occurred.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/var/svc/manifest/network/{rpc}/\fI<svcname>\fR-\fI<proto>\fR\&.xml\fR\fR
.ad
.sp .6
.RS 4n
default output manifest file name
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Evolving
.TE

.SH SEE ALSO
.sp
.LP
.BR inetd.conf (5),
.BR attributes (7),
.BR smf (7),
.BR inetadm (8),
.BR inetd (8),
.BR svccfg (8)
